package com.bi.design.entity;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.bi.design.pojo.BaseModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Getter
@Setter
@Accessors(chain = true)
@TableName(value = "device_data", autoResultMap = true)
public class DeviceData extends BaseModel implements Serializable {

    private static final long serialVersionUID = -547782154850248368L;

    @TableField("device_code")
    private String deviceCode;

    @TableField(value = "row_data", typeHandler = FastjsonTypeHandler.class)
    private JSONObject rowData;

    @TableField("report_time")
    private Date reportTime;

    @TableField(exist = false)
    private String deviceName;
}
